package com.qc.ayouth.shop.admin.controller.admin;

import com.qc.ayouth.shop.core.beans.vo.ResponseVO;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 简单示例
 * Created by Haojg on 2020/7/5
 */
@RestController
@RequestMapping("/test")
@Validated
public class ExampleController {

    @GetMapping("/testing")
    public ResponseVO info() {
        ResponseVO vo = new ResponseVO();
        vo.add("result", "bo.getData()");
        return vo;
    }

//    @RequiresPermissions(value={"xxx:xxx","xxx:xxx"},logical=Logical.OR)
//    @GetMapping("/list")
//    public ResponseVO list(String username, String mobile,
//                           @RequestParam(defaultValue = "1") Integer page,
//                           @RequestParam(defaultValue = "10") Integer limit,
//                           @Sort @RequestParam(defaultValue = "add_time") String sort,
//                           @Order @RequestParam(defaultValue = "desc") String order) {
//        List<LitemallUser> userList = userService.querySelective(username, mobile, page, limit, sort, order);
//        return ResponseUtil.okList(userList);
//    }

//    @RequestMapping(value = "/user", method = RequestMethod.PUT)
//    public void doUpdate(@RequestBody ApiUser apiUser) {
//        AfaUser user = BeanUtils.copyBean(apiUser, AfasUser.class);
//        userService.updateAfaUser(user);
//    }
//
//    @RequestMapping(value = "/user", method = RequestMethod.DELETE)
//    public void doDelelte(@RequestBody ApiUser apiUser) {
//        AfaUser user = BeanUtils.copyBean(apiUser, AfaUser.class);
//        userService.delAfaUser(user);
//    }

//    @PostMapping(value="save")
//    public void save(@RequestBody CmsTagsDto v){
//        List<String> tags=new ArrayList<>(16);
//        tags.add(v.getName());
//        service.saveTags(tags);
//    }
}
